<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title></title>

  </head>
  <body>
    <div id="content">
        <template>
        <div v-if="Object.keys(model).length != 0" style="max-width: 1300px;margin: 0 auto;padding:5px;">
            <center>
                <div style="font-size:26px;font-weight: bold;text-align:left;color: #333333;">{{model.partyTitle}}</div>
            </center>
            <div style="text-align:left;margin-top:20px;color: #b0b0b0;">
                <span >发布时间：</span>{{model.sendTime}}<br/>
                <span  v-if="model.sendType=='5' || model.sendType=='6'" >地点：</span>{{model.partyPlace}}<br/>
                <span  v-if="model.sendType=='6'">讲师：</span>{{model.partyPerson}}
    
            </div>
            <div style="margin-top:20px;" v-html="model.partyContent"></div>

            <div v-if="attUrl.length>0"  style="background:#f7f7f7; padding:10px;">
                <div>附件:</div>
                <a v-for="(url,i) in attUrl" :key="i" :href="url" style="text-decoration:none;display: block; margin-top:10px;"><img src="down.png" style="width:16px; display:inline-block; float:left; margin-right:6px;"/>{{attNams[i]}}</a>
            </div>
        </div>
        </template>
    </div>
    <script type="text/jscript" src="js/vue.min.js"></script>
	<script type="text/jscript" src="js/axios.min.js"></script>
	<script type="text/jscript" src="js/request.js"></script>
    <script type="text/javascript" src="js/defaultSettings.js?t=2022518"></script>
    <script type="text/javascript" src="js/base64.js"></script>
    <script>
        
        var content = new Vue({
				el: '#content',
				data() {
					return {
                        model:{},
                        reader:[],
                        readCount:0,
                        allCount:0,
                        title:'详情',
                        attNams:[],
                        attUrl:[],
					}
				},
				methods: {
					 query() {
                        let param = new URLSearchParams(location.search)
                        let keyId = param.get("keyId")
                        let accountNo = param.get("accountNo")
                        let that = this
                        request.get({url:'/ScPartyBuildController/queryPartyDetailByPhone',data:{keyId:keyId,accountNo:accountNo}}).then(res => {
                            if (res.success && res.result) {
                                that.model = res.result.party
                                that.model["partyContent"] =  Base64.decode(that.model.partyContent)
                                that.reader=res.result.partyReader
                                that.allCount = that.reader.length
                                if(that.model.partyAtt){
                                    let attArr = that.model.partyAtt.split(',');
                                    let names = []
                                    let urls = []
                                    for(var i=0;i<attArr.length;i++){
                                        names.push(attArr[i].substring(attArr[i].lastIndexOf('/')+1))
                                        urls.push(settings.fileServer+attArr[i])
                                    }
                                    that.attNams = names
                                    that.attUrl = urls
                                }
                            }
                        })
					}
				
					
					
				},
				mounted() {
					this.query()
					
				}
				

			});
    </script>
  </body>
  <style>
    img{
        max-width: 100%;
    }
    </style>
</html>
